package edu.cug.water.crawler.job.service.impl;

import edu.cug.water.crawler.common.utils.EsUtils;
import edu.cug.water.crawler.job.service.DataStatisticService;
import org.frameworkset.elasticsearch.entity.ESDatas;
import org.frameworkset.elasticsearch.entity.ESIndice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("dataStatisticService")
public class DataStatisticServiceImpl implements DataStatisticService {


    @Autowired
    EsUtils esUtils;

    @Override
    public List<ESIndice> getIndices() {
        return esUtils.getAllIndex();
    }

    @Override
    public List<String> getIndexsName() {
        return esUtils.getAllIndexName();
    }

    @Override
    public ESDatas<?> getIndexData(String indexName) {
        return esUtils.getIndexData(indexName);
    }


}
